<?php

class PracticeTestController extends CoreController {

	function __construct()
	{
		parent::__construct();
		$this->init();
	}

	public function returnTable()
	{
		return $this->PracticeTest;
	}

	public function init()
	{
		$this->PracticeTest();
	}

	public function PracticeTest()
	{
		global $post;
		$this->loadModel(array('PracticeTestModel','PracticeTestAnswerModel','PracticeTestQuestionModel'));
		$this->loadComponent('facebookComponent');
		$userID = $this->facebookComponent->getUserID();
		$practiceTest = $this->PracticeTestModel->getPracticeTest($post->ID);
		$question = $this->PracticeTestQuestionModel->getPracticeTestQuestion($practiceTest->id);
		$this->render('template-quiz-question',array('practiceTest'=>$practiceTest,'question'=>$question,'userID'=>$userID));
	}
	

}